package String;

public class _434_NumberofSegmentsinaString {
    public int countSegments(String s) {
        String conductS = s.trim();
        if (conductS.equals("")) {
            return 0;
        }
        return conductS.split("\\s+").length;
    }
}
